<table width="600" border="6">
  <tr align="center">
    <td colspan="5"><h1><%= @event.name %></h1></td>
  </tr>
    
  		<% if session[:user_id] %>
<% if User.find(session[:user_id]).role == "admin" %>
	  <tr align="center">
    <td colspan="5"><%= @event.description %>-<%= @event.cod %></td>
 </tr>
<% else %>
  <tr align="center">
    <td colspan="5"><%= @event.description %></td>
 </tr>
<% end %>
<% end %>
  

 
   <tr align="center">
	<td colspan="5"><%= @event.eventstart.strftime("%d-%b-%Y") %> -- <%= timestring = @event.eventstart.strftime("%I:%M %p") %> </td>
 </tr>
 
   <tr align="center">
    <td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>Proporcion</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>        
  </tr>
     
  <% for eventparticipant in @dataevent %>   
 <tr align="center">
    <% for participant in Participant.find_all_by_id(eventparticipant.participant_idf)  %>
    
	<td width="65">
	<% if(participant.photo_file_name.blank?)&(participant.image.blank?) %>
		<%= image_tag("/images/default.jpg", :size => "60x60", :align => "middle"  ) %>
	<% end %>
	<% if(participant.photo_file_name.blank?)%>
		<%= image_tag participant.image, :size => "60x60", :align => "middle"  %>
	<% end %>
	<% if(participant.image.blank?)%>
		<%= image_tag participant.photo.url, :size => "60x60", :align => "middle"  %>
	<% end %>	
	</td>
	<td width="370"><strong><%= participant.name%></strong></td>
    <td width="68"><%= eventparticipant.proportion%></td>
	<td width="68"><%= eventparticipant.homevisitant%></td>
    <td width="69"><%= button_to "Apostar" , :controller => 'bets', :action => 'new', :id => eventparticipant.id %></td>
    <% end %>
    <%end %>
    
    


<table border="0" align="center">  
</tr>
    <td colspan="5" align="center">Vea las proporciones en las otras casas de apuestas afiliadas</td>
</tr>


    
</tr>
    <td colspan="5" align="center"><%= link_to "CASA 1", "/service/all_play_consume/"+@event.id.to_s  %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CASA 2</td>
</tr>

</tr>
    <td colspan="5" align="center"><img src="/images/logos/favicon.bmp" width="40" height="30" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="/images/logos/favicon.bmp" width="40" height="30" /></td>
</tr>
</table> 

		<% if session[:user_id] %>
<% if User.find(session[:user_id]).role == "admin" %>
<table>
	</tr>
    <td colspan="5" align="center"><%= link_to "Agregar nuevo parcicipante", "/eventparticipants/new/"+@event.id.to_s  %></td>
</tr>
</table>
<% end
end %> 
